import { request } from '../../request'

/**
 * 获取发表列表
 */
export function fetchPublishList(params: any) {
  return request.get<ApiModels.PageList<ApiModels.weixin.Material>>('/weixin/freePublish/list', { params })
}

/**
 * 获取发表详情
 */
export function fetchPublishDetail(articleId: string) {
  return request.get<ApiModels.weixin.PublishModel[]>(`/weixin/freePublish/getByArticleId?articleId=${articleId}`)
}

/**
 * 删除发表
 */
export function deletePublish(articleId: string) {
  return request.delete(`/weixin/freePublish/delete?articleId=${articleId}`)
}
